package com.csap.framework.oauth2.server.model;

import com.csap.framework.annotation.apidoc.ApiModel;
import com.csap.framework.annotation.apidoc.ApiModelProperty;
import com.csap.framework.annotation.apidoc.Description;
import com.csap.framework.oauth2.server.entity.ClientEntity;
import com.csap.mybatisplus.extension.activerecord.CloneModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Set;

/**
 * <p>
 * 客户端信息
 * </p>
 *
 * @author yangchengfu
 * @dateTime 2021-07-25 23:51:30
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ApiModel(description = "客户端信息", value = "client对象")
@Description(value = "客户端信息Model")
public class ClientModel extends CloneModel<ClientModel, ClientEntity> {
    @ApiModelProperty(description = "客户端标识", value = "客户端标识")
    private String id;
    @ApiModelProperty(description = "客户端标识", value = "客户端标识")
    private String clientId;
    @ApiModelProperty(description = "客户端秘钥", value = "客户端秘钥")
    private String clientSecret;
    @ApiModelProperty(description = "创建时间", value = "创建时间")
    private LocalDateTime createTime;
    @ApiModelProperty(description = "是否可用", value = "是否可用")
    private Integer enabled;
    @ApiModelProperty(description = "是否删除", value = "是否删除")
    private Integer del;
    @ApiModelProperty(description = "平台ID", value = "平台ID")
    private String platform;
    @ApiModelProperty(description = "客户端LOGO", value = "客户端LOGO")
    private String logo;
    @ApiModelProperty(description = "根URL", value = "根URL")
    private String rootUrl;
    @ApiModelProperty(description = "描述", value = "描述")
    private String descr;
    @ApiModelProperty(description = "客户端作用域", value = "客户端作用域")
    private List<String> scope;
    @ApiModelProperty(description = "权限列表", value = "权限列表")
    private Set<String> permissions;
    @ApiModelProperty(description = "允许授权的URL", value = "允许授权的URL")
    private List<String> allowUrl;
}
